import http from './config';
import { AxiosPromise, AxiosRequestConfig } from 'axios';
import { Response } from '../bean';

class Api {
  public static uploadMyQrcode = {
    p: 'file/uploadQr/{token}',
    r: (params: {
      token: string,
      form: FormData,
    }): AxiosPromise<Response<any>> => {
      return http.post(`file/uploadQr/${params.token}`, params.form);
    },
  };

  public static getReloadHref = {
    p: 'imServer/address',
    r: (): AxiosPromise<Response<any>> => {
      // let config: AxiosRequestConfig = {
      //   headers: {
      //     Authorization: params.token
      //   },
      // };
      return http.get(`imServer/address`);
    },
  };


}

export {
  Api,
};